package cn.iocoder.yudao.module.promotion.api.yearcardorder;

import cn.hutool.core.bean.BeanUtil;
import cn.iocoder.yudao.module.promotion.api.yearcardorder.dto.YearCardOrderRespDTO;
import cn.iocoder.yudao.module.promotion.service.yearcardorder.YearCardOrderService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;

@Service
@Validated
public class YearCardOrderApiImpl implements YearCardOrderApi {

    @Resource
    private YearCardOrderService yearCardOrderService;

    @Override
    public YearCardOrderRespDTO getEnabledYearCardOrderByMemberId(Long id) {
        return BeanUtil.copyProperties(yearCardOrderService.getEnabledYearCardOrderByMemberId(id), YearCardOrderRespDTO.class);
    }
}